/*
 * @Description: 存放速度数据，用在去畸变中
 * @Author: Sang Hao
 * @Date: 2021-09-15 17:15:59
 * @LastEditTime: 2021-10-27 13:33:05
 * @LastEditors: Sang Hao
 */

#ifndef LIDAR_SLAM_SENSOR_DATA_VELOCITY_DATA_HPP_
#define LIDAR_SLAM_SENSOR_DATA_VELOCITY_DATA_HPP_

#include <deque>
#include <Eigen/Dense>

namespace lidar_slam {
class VelocityData {
public:
	struct LinearVelocity {
		double x = 0.0;
		double y = 0.0;
		double z = 0.0;
	};
	struct AngularVelocity {
		double x = 0.0;
		double y = 0.0;
		double z = 0.0;
	};

public:
	/* data */
	double time = 0.0;
	LinearVelocity linear_velocity;
	AngularVelocity angular_velocity;

public:
	static bool SyncData(std::deque<VelocityData>& UnsyncedData, 
		std::deque<VelocityData>& SyncedData, double sync_time);
    void TransformCoordinate(Eigen::Matrix4f transform_matrix);
};
}

#endif